﻿using BBCode.Tags;

namespace BBCode.Nodes
{
    /// <summary>
    /// Interface used by all BBCode Nodes including smileys.
    /// </summary>
    public interface INode
    {
        /// <summary>
        /// Gets the ID.
        /// </summary>
        string ID { get; }

        /// <summary>
        /// Gets the text.
        /// </summary>
        string Text { get; }

        /// <summary>
        /// Gets or sets the parent.
        /// </summary>
        /// <value>
        /// The parent.
        /// </value>
        INode Parent { get; set; }

        /// <summary>
        /// Gets the tag.
        /// </summary>
        ITag Tag { get; }

        /// <summary>
        /// Gets the index of the node.
        /// </summary>
        /// <value>
        /// The index of the node.
        /// </value>
        NodeIndex NodeIndex { get; }

        /// <summary>
        /// Prints the specified should auto parse links.
        /// </summary>
        /// <param name="shouldAutoParseLinks">if set to <c>true</c> [should auto parse links].</param>
        /// <returns></returns>
        string Print(bool shouldAutoParseLinks);
    }
}